packetsocket.htmlHTMLudog¡πùΔ§πùΔ§ÅÅfiÔ Monkeybread Realbasic plugin - Documentation - PacketSocket

MBS Plugin Documentation

This is the documentation for the Realbasic Plugins from Monkeybreadsoftware.de. You find these plugins and the newest version of this document at http://www.monkeybreadsoftware.de/realbasic inside the plugins section.

This help was last updated on Freitag, 6. September 2002 and covers 2136 items: 126 classes, 2 controls and 583 global functions.

The list of the themes Global methods by category Global methods by name The list of the classes The list of the controls

class PacketSocket

class, Network Plugin version: 2.6 Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: An extension to the socket class for easy sending packets through the net.
Notes:
Subclass of Socket.
A packet is made like this:
+0: Size of data block
+4: 4 byte code string
+8: 4 byte for ID
+12: variable data.

The numbers are send in low endian format so this is crossplatform.

This socket subclass can be easily made in Realbasic code itself. I did it for several of my applications, so if you like it decide between making it yourself or using this one which may even be faster, because it's written in C?

This class is only available in RB 4.0 or newer, because it crashes on RB 3.5.

ReceivedPacket(data as string,code as string,ID as integer)

event, Network Plugin version: 2.6 Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: A packet was received.

SendPacket(data as string[,code as string[,ID as integer]])

method, Network Plugin version: 2.6 Fr, 30. Aug 2002
Mac OS Classic: Works. Mac OS Carbon: Works. Windows: Works.
Function: Sends a packet.
Notes:
code and ID are optional.
Code is a 4 byte string to identify the content.
(e.g. "mess" for a message or "link" for a link.)

Contact

Written 2002 by Christian Schmitz. Feel free to ask or report mistakes to realbasic@macsw.de.
Thanks.

This resource fork intentionally left blank ˇˇ